export CPP=g++
export CFLAGS=-Wall -ansi -pedantic
SOCKS=../../socks

client: client_tcp.o $(SOCKS)/sock.o $(SOCKS)/sockdist.o
	$(CPP) $(CFLAGS) $^ -o $@

client_tcp.o: client_tcp.cpp
	$(CPP) $(CFLAGS) -c $<


server: server_tcp.o $(SOCKS)/sock.o $(SOCKS)/sockdist.o
	$(CPP) $(CFLAGS) $^ -o $@

server_tcp.o: server_tcp.cpp
	$(CPP) $(CFLAGS) -c $<


sock:
	@(cd $(SOCKS) && $(MAKE))


clean:
	rm -rf *.o

all: sock client server clean

